package com.yangxiangrice.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yangxiangrice.mapper.AgItemListingMapper;
import com.yangxiangrice.pojo.AgItemListing;
import com.yangxiangrice.pojo.BasList;
import com.yangxiangrice.service.AgItemListingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Description: TODO
 * @author: shixiaojian
 * @date: 2021年11月16日 17:59
 */
@Service
public class AgItemListingServiceImpl extends ServiceImpl<AgItemListingMapper, AgItemListing> implements AgItemListingService {
    @Autowired
    AgItemListingMapper agItemListingMapper;

    @Override
    public IPage<AgItemListing> seletePage(IPage<AgItemListing> page, QueryWrapper wrapper) {
        return agItemListingMapper.selectPage(page,wrapper);
    }

    @Override
    public Integer getPurchaseNum(String agItemName,String relatedPerson) {
        return agItemListingMapper.getPurchaseNum(agItemName,relatedPerson);
    }

    @Override
    public Integer getConsumeNum(String agItemName,String relatedPerson) {
        return agItemListingMapper.getConsumeNum(agItemName,relatedPerson);
    }

}
